/**
 * 管理者-总经理
 * @author liaosh
 * @date 2022-10-15 22:29
 */
public class GeneralManager extends Manager {

    public GeneralManager(String name) {
        this.name = name;
    }

    @Override
    public void handleRequest(Request request) {
        if (request.getRequestType() != null
                && request.getRequestType() == 1) {
            // 可处理任意天数的请假
            System.out.println("类型：" + request.getRequestTypeStr() + "，申请内容："
                    + request.getRequestContent() + "，数量：" + request.getNumber()
                    + " " + name + "审批通过");
        } else if (request.getRequestType() != null
                && request.getRequestType() == 2
                && request.getNumber() <= 1000) {
            // 可处理 1000 以内的加薪
            System.out.println("类型：" + request.getRequestTypeStr() + "，申请内容："
                    + request.getRequestContent() + "，数量：" + request.getNumber()
                    + " " + name + "审批通过");
        } else if (request.getRequestType() != null
                && request.getRequestType() == 2
                && request.getNumber() > 1000) {
            // 加薪大于 1000，再考虑考虑
            System.out.println("待考虑");
        }
    }
}
